#ifndef PLAYER_HH
#define PLAYER_HH

#include "Character.hh"
/*This header file defines a Player class, derived from a Character base class (assumed to be defined in "Character.hh"), representing a player character in a game. Key features include:

Constructor: Initializes the player with a name.
Item Interaction:
applyItemEffects(const Item& item): Applies effects of an item to the player.
addItemToInventory(Item* item): Adds an item to the player's inventory.
useItem(Item* item): Uses an item (returns true if successful).
soldItem(Item* item): Simulates selling an item (returns true if successful).
Experience and Money:
gainExperience(int xp): Increases the player's experience points.
gainMoney(int my): Increases the player's money (variable name "my" is unconventional but functional).
Leveling and Mana:
levelUp(): Advances the player to the next level.
manaup(): Increases the player's mana (implementation details not shown).
getmana(), getMaxmana(): Getters for current and maximum mana.
Skill Management:
getskill(): Checks if a skill is active.
skillreset(): Resets the skill (implementation details not shown).
Operator Overloads:
operator+, operator-: Overloads for combining or subtracting player attributes (possibly for buffs/debuffs).
operator=: Overloads assignment for player objects.
Override:
toString() const override: Provides a string representation of the player (overrides a base class method).
This class extends the Character class with player-specific functionalities, including item management, experience gain, leveling, and custom operator overloads for enhanced gameplay mechanics.*/
class Player : public Character {
public:
    Player(std::string name);
    void applyItemEffects(const Item& item);
    void gainExperience(int xp);
    void gainMoney(int my);
    void addItemToInventory(Item* item);
    bool useItem(Item* item);
    bool soldItem(Item* item);
    void levelUp();
    void manaup();
    std::string toString() const override;
    int getmana() const ;
    int getMaxmana() const;
    bool getskill() const;
    void skillreset() ;
    Player operator+(const Player&buff);
    Player operator-(const Player &buff);
    Player &operator=(const Player &other);

private:
    int level;
    int currentXP;
    int nextLevelXP;
    int mana;
    int Maxmana;
    bool skill;
};

#endif 